Page({
  data: {
    currentOpen: -1,
    items: [
        {
            title: '哈尔滨',
            options: [
                {
                    text: '山东',
                    value: '1',
                },
                {
                    text: '厦门',
                    value: '2',
                },
                {
                    text: '合肥',
                    value: '4',
                },
        
            ],
        },
    ],
   
    current: 0,
        items1: [
            {
                title: '推荐',
                subTitle: '描述文案',
                content: '西瓜',
            },
            {
                title: '最新',
                subTitle: '描述文案',
                content: '西红柿',
            },
            {
                title: '热门',
                subTitle: '描述文案',
                content: '蚂蚁',
            },
        ],
},
onSwipeChange(e) {
  this.setData({
      current: e.detail.current,
  });
},
onChange(current) {
  this.setData({
      current,
  });
},
  onConfirm(value) {
      my.alert({
          content: value,
      });
  },
  handleTap(e) {
    console.log(e);
    my.alert({
        title: '点击按钮',
    });
},
handleChange(value, items, e) {
    console.log(value, items, e);
},
onTapItem(e) {
    console.log(e);
    const { index } = e.currentTarget.dataset;
    const { currentOpen } = this.data;
    let value = index;
    if (currentOpen === index) {
        value = -1;
    }
    this.setData({ currentOpen: value });
},
});
